/**
 * Created by Administrator on 2017/1/20.
 */
function prepareSlideShow() {
    var supported = document.getElementsByTagName || document.getElementById;
    if (!supported) {
        return false;
    }

    var linkList = document.getElementById('link-list');
    if (!linkList) {
        return false;
    }

    var slideShow=document.createElement('div');
    slideShow.setAttribute('id','slide-show');
    var preview=document.createElement('img');
    preview.setAttribute('src','images/topics.gif');
    preview.setAttribute('alt','building blocks of web design');
    preview.setAttribute('id','preview');
    slideShow.appendChild(preview);

    var links = linkList.getElementsByTagName('a');
    for (var i = 0; i < links.length; i++) {
        (function (i) {
            links[i].onmouseover = function () {
                moveElement('preview', i * -100, 0, 10);
            };
        }(i))
    }
}

addLoadEvent(prepareSlideShow);